/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.turistmontoro;

import javax.jws.WebService;
import javax.jws.WebMethod;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author ajdiaz
 */
@WebService(serviceName = "WSTomcat")
public class MontoroTWebService {

    /**
     * This is a sample web service operation
     */
    static String ofertasElGordo;
    static String ofertasDiarias;
    static String ofertasHotelMirador;
    static String ofertasPubJoven;
    static String ofertasLocal;
    public Consultas c;

    public MontoroTWebService() {
        try {
            System.out.println("Constructor....");
            ofertasLocal = ofertasDiarias = "";
            c = new Consultas();
//            SimpleTrigger.main(null);
        } catch (Exception ex) {
            Logger.getLogger(MontoroTWebService.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    @WebMethod(operationName = "getOfertaElGordo")
    public String getOfertaElGordo() {
        //TODO write your implementation code here:
        c.deleteOfferPassed();
        c.getOfertaLocal("elgordo");

        return ofertasLocal;
    }

    @WebMethod(operationName = "getOfertaDiaria")
    public String getOfertaDiaria() {
        //TODO write your implementation code here:
        c.deleteOfferPassed();
        c.getOfertaDiaria();

        return ofertasDiarias;
    }

    @WebMethod(operationName = "getOfertaHotelMirador")
    public String getOfertaHotelMirador() {
        //TODO write your implementation code here:
        c.deleteOfferPassed();
        c.getOfertaLocal("hotelmirador");

        return ofertasLocal;
    }

    @WebMethod(operationName = "getOfertaJoven")
    public String getOfertaJoven() {
        //TODO write your implementation code here:
        c.deleteOfferPassed();
        c.getOfertaLocal("pubjoven");

        return ofertasLocal;
    }
    
    @WebMethod(operationName = "getOfertaMolinoLanava")
    public String getOfertaMolinoLanava() {
        //TODO write your implementation code here:
        c.deleteOfferPassed();
        c.getOfertaLocal("molinolanava");

        return ofertasLocal;
    }
    
     @WebMethod(operationName = "getOfertaMolinoSnaJuan")
    public String getOfertaMolinoSnaJuan() {
        //TODO write your implementation code here:
        c.deleteOfferPassed();
        c.getOfertaLocal("molinosanjuan");

        return ofertasLocal;
    }
     
      @WebMethod(operationName = "getOfertaCasaMaika")
    public String getOfertaCasaMaika() {
        //TODO write your implementation code here:
        c.deleteOfferPassed();
        c.getOfertaLocal("casamaika");

        return ofertasLocal;
    }
}
